#define _CRT_SECURE_NO_WARNINGS 1

using namespace std;
#include<iostream>
#include"vector.h"

void test1()
{
	xiaolin::vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(3);



	for (size_t i = 0; i < v.size(); i++)
	{
		cout << v[i]++ << " ";
	}
	cout << endl;
	v.insert(v.begin(), 100);


	auto it = v.begin();
	for (auto x : v)
	{
		cout << x << " ";
	}
	cout << endl;
	v.erase(v.begin());
	v.pop_back();
	v.pop_back();

	xiaolin::vector<int> v2(v);
	for (auto x : v2)
	{
		cout << x << " ";
	}
	cout << endl;
}

//void test2()
//{
//	xiaolin::vector<string>v;
//	v.push_back("111111111");
//	v.push_back("222222222");
//	v.push_back("333333333");
//
//	v.push_back("444444444");
//	v.push_back("555555555");
//	for (auto e : v)
//	{
//		cout << e << endl;
//	}
//	cout << endl;
//
//}

void test3()
{
	xiaolin::vector<int> v(10, 1);
	xiaolin::vector<string> v1(10, "1111");

	xiaolin::vector<int> v2(10, 1);



	// vector<int> v;

	for (auto e : v)
	{
		cout << e << " ";
	}
	cout << endl;


	xiaolin::vector<int> v3(v.begin(), v.end());
	for (auto e : v3)
	{
		cout << e << " ";
	}
	cout << endl;

	string str("hello world");
	xiaolin::vector<char> v4(str.begin(), str.end());
	for (auto e : v4)
	{
		cout << e << " ";
	}
	cout << endl;

	int a[] = { 16,2,77,29 };
	xiaolin::vector<int> v5(a, a + 4);
	for (auto e : v5)
	{
		cout << e << " ";
	}
	cout << endl;
}
int main()
{
	test3();
	return 0;
}